<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/base/jsp/include.jsp"%>
<style>

</style>
<script type="text/javascript">
    var id = "${id}";
    var submitForm = function($dialog, $grid, $pjq) {
        if ($('form').form('validate')) {
            var obj=sy.serializeObject($('form'));
            obj.type = $("#type").find("option:selected").val();
            obj.isAgree = 0;
            var url=sy.contextPath + '/serviceOrganization/myListSave.do';
            $.post(url, obj, function(result) {
                if (result.code == 0) {
                    $grid.datagrid('reload');
                    $dialog.dialog('destroy');
                } else {
                    $pjq.messager.e('添加失败,'+result.msg);
                }
            }, 'json');
        }
    };    
    $(function() {
        if (id != '') {
            parent.$.messager.progress({
                text : '数据加载中....'
            });
            $.post(sy.contextPath + '/serviceOrganization/findById.do', {
                id : id
            }, function(result) {
                if (result) {
                    $('form').form('load', result);
                    $('#file_upload').setFileId(result.image,true,true);
                }
                parent.$.messager.progress('close');
            }, 'json');
        }   
    });
    
</script>
</head>
<body>
    <form id="form" method="post">
        <input name="id" type="hidden" />
        <input name="fid" type="hidden" />
        <div style="padding:15px;font-size: 12px">
            <table style="table-layout:fixed;" border="0" cellspacing="0" class="formtable">
                <tr>
                    <th style="width:100px;">板块：</th>
                    <td>
                        <select class="easyui-combobox" id = "type" name = "type"  data-options="required:true,editable:false" style="width:100%">
                            <option value="运营机构">运营机构</option>
                            <option value="法律服务">法律服务</option>
                            <option value="财会服务">财会服务</option>
                            <option value="知识产权">知识产权</option>
                            <option value="管理咨询">管理咨询</option>
                            <option value="其它">其它</option>
                        </select>
                    </td>
                    <th style="width:100px;">标题：</th>
                    <td>
                        <input class="easyui-textbox" id = "title" name = "title"  data-options="required:true" style="width:100%"/>
                    </td>            
                </tr>   
                <tr>    
                    <th style="width:100px;">企业资质：</th>
                    <td colspan="3">
                        <input class="easyui-textbox" id = "companyZz" name = "companyZz"  data-options="showSeconds:false" style="width:100%"/>
                    </td>
                </tr>
                <tr>
	                <th style="width:100px;">机构简介：</th>
	                    <td colspan="3">
	                        <textarea class="easyui-textbox" id = "organizationMsg" name = "organizationMsg"  data-options="required:true,validType:'length[1,500]',multiline:true" style="width:100%;height:100px"></textarea>
	                    </td>
	                </tr>
                <tr>    
                    <th style="width:100px;">服务内容：</th>
                    <td colspan="3">
                        <textarea class="easyui-textbox" id = "serviceContent" name = "serviceContent"  data-options="required:true,validType:'length[1,1000]',multiline:true" style="width:100%;height:100px"></textarea>
                    </td>
                </tr>              
            </table>
        </div>
    </form>
</body>
</html>